package duilibhx;
import cpp.Sys;
/**
 * ...
 * @author wangjian QQ:421924396
 */

class Lib 
{
	//public inline static var UI_WNDSTYLE_CONTAINER:Int = 0;
	//public inline static var UI_WNDSTYLE_FRAME:Int = 0x10000000|;
	
	public inline static var WM_CREATE:Int = 0x0001;
	public inline static var WM_DESTROY:Int = 0x0002;
	public inline static var WM_MOVE:Int = 0x0003;
	public inline static var WM_SIZE:Int = 0x0005;
	public inline static var WM_ERASEBKGND:Int = 0x0014;
	private static var sIsInit = false;
	public static function run(initFunc:Void->Void):Void {
		if (sIsInit)
		{
			throw("duilibhx.Lib.create called multiple times. This function is automatically called by the project code.");
		}
		var create_main_frame =cpp.Lib.load("DuiLib","dui_create_main_frame", 1);
		create_main_frame(
			function() {
				initFunc();
			}
		);
	}
	
	public static function quit():Void {
		dui_lib_quit();
	}
	static var dui_lib_quit = cpp.Lib.load("DuiLib", "dui_lib_quit", 0);
}